package cn.huiyunche.base.service.interfaces;

import cn.huiyunche.base.service.model.DCompareFaceResult;
import cn.huiyunche.tools.basic.exceptions.BusinessException;

/**
 * Created by qichao on 2017/3/2.
 * 比对司机交车照片中的第三张（3033，司机运单车辆合影自拍照片）
 */
public interface DriverCompareService {

    /**
     * Compare face api face compare result.
     *
     * @param sourceImageUrl the image source key 原图片url
     * @param targetImageUrl the image target key 需要比对的图片url
     * @return 两张照片比对的结果 （接口返回的置信度数值与阈值的比对结果）
     * @throws BusinessException the business exception
     */
    DCompareFaceResult compareFaceApi(String sourceImageUrl, String targetImageUrl);

    /**
     * Verify that the driver is he.
     *
     * @param waybillId        the waybill id
     * @param sourceImageToken the source image token
     * @param targetImageToken the target image token
     */
    void verifyThatTheDriverIsHe(Long waybillId, String sourceImageToken, String targetImageToken);

}
